package com.woniuxy.educationplatform.service.impl;

import com.woniuxy.educationplatform.bean.OptionBean;
import com.woniuxy.educationplatform.mapper.OptionMapper;
import com.woniuxy.educationplatform.mapper.QuesMapper;
import com.woniuxy.educationplatform.service.IOptionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional(readOnly = true)
@Service
public class OptionServiceImpl implements IOptionService {
    @Resource
    private OptionMapper optionMapper;

    @Override
    public List<OptionBean> findAll() {
        return optionMapper.findAll();
    }

    @Override
    @Transactional(isolation = Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
    public void insert(OptionBean optionBean) {
         optionMapper.insert(optionBean);
    }


}
